package com.harmontronics.hanma.paas.paas.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.harmontronics.hanma.paas.paas.interceptor.QueryInterceptor;
import org.apache.ibatis.plugin.Interceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyBatisPlusConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor().setLimit(10000L);
    }

    @Bean
    public Interceptor getInterceptor() {
        return new QueryInterceptor();
    }
}
